import request from '@/utils/request'
import type { ApiResponse } from './components/ApiResponse'
import type { OrderType, SubmitOrderType, OrderInfoType } from './components/orderType'

// 提交订单
export const submitOrderApi = (data: SubmitOrderType) => {
  return request.post<ApiResponse<OrderType>>('/member/order', data)
}

// 获取订单详情
export const getOrderInfoApi = (id: string) => {
  return request.get<ApiResponse<OrderInfoType>>(`/member/order/${id}`)
}
